package hsl.study.videocapturesystem.controller;


import hsl.study.videocapturesystem.service.VideoCaptureSystemWithJpgService;
import hsl.study.videocapturesystem.service.VideoCaptureSystemWithPngService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: hsl
 * @CreateDate: 2025/7/29 9:43
 * @Version: 1.0
 */

@RestController
@RequestMapping("/VideoCaptureSystem")
public class VideoCaptureSystemController {

    @Resource
    private VideoCaptureSystemWithJpgService videoCaptureSystemWithJpgService;

    @Resource
    private VideoCaptureSystemWithPngService videoCaptureSystemWithPngService;
    @GetMapping("/chat01")
    public String chat01() {
        long start = System.currentTimeMillis();
        videoCaptureSystemWithJpgService.videoCaptureSystemDemo();
//        videoCaptureSystemWithPngService.videoCaptureSystemDemo();
        long end = System.currentTimeMillis();
        System.out.println("end - start " + (end - start));
        return "hello world";
    }
}
